-
Notifications
You must be signed in to change notification settings - Fork 273
SYNTHESIZER: Add counterexample-guided loop assigns synthesis #7448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportBase: 78.46% // Head: 78.47% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #7448 +/- ##
===========================================
+ Coverage 78.46% 78.47% +0.01%
===========================================
Files 1662 1662
Lines 190904 191013 +109
===========================================
+ Hits 149794 149899 +105
- Misses 41110 41114 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
964964f
to
184821a
Compare
src/goto-synthesizer/enumerative_loop_contracts_synthesizer.cpp
Outdated
Show resolved
Hide resolved
184821a
to
4dee40e
Compare
Implement the functionality described below. Motivation --- This loop assigns synthesizer use the idea counter-example-guided synthesis (CEGIS) to synthesize loop assigns targets. It is based on the same CEGIS framework as the loop invariant synthesizer w ith the following difference. Use Cases --- Our loop invariants synthesizer will synthesize invariants clauses for all loops without loop invariant annotation. The loop assigns synthesizer will synthesize assigns clauses for all loops without loop invariant annotation **and** loop assigns annotation. Cause Loop ID --- In the loop invariant synthesizer, we say a loop is a cause loop if the violation is dependent on the loop's havoc instructions. Because invariant clauses affect the havoced values which could flow into variables outside the loop. In the loop assigns synthesizer, we say a loop is a cause loop if the violation is in the loop. Because assigns clauses only affect the CAR of its own loop body. Synthesizer --- For an assignable violation with checked target `T`, the new assigns target will be `T`. If `T` is a non-constant target, e.g., `ptr[i]` with `i` also an assigns target, we widen it to `__CPROVER_POINTER_OBJECT(T)`. We add the new target to cause loop one by one starting from the most-inner one. Until the assignable violation is resolved.
4dee40e
to
251c257
Compare
Implement the functionality described below.
Motivation
This loop assigns synthesizer use the idea counter-example-guided synthesis (CEGIS) to synthesize loop assigns targets. It is based on the same CEGIS framework as the loop invariant synthesizer w ith the following difference.
Use Cases
Our loop invariants synthesizer will synthesize invariants clauses for all loops without loop invariant annotation. The loop assigns synthesizer will synthesize assigns clauses for all loops without loop invariant annotation and loop assigns annotation.
Cause Loop ID
In the loop invariant synthesizer, we say a loop is a cause loop if the violation is dependent on the loop's havoc instructions. Because invariant clauses affect the havoced values which could flow into variables outside the loop. In the loop assigns synthesizer, we say a loop is a cause loop if the violation is in the loop. Because assigns clauses only affect the CAR of its own loop body.
Synthesizer
For an assignable violation with checked target
T
, the new assigns target will beT
. IfT
is a non-constant target, e.g.,ptr[i]
withi
also an assigns target, we widen it to__CPROVER_POINTER_OBJECT(T)
. We add the new target to cause loop one by one starting from the most-inner one. Until the assignable violation is resolved.